﻿@model PhoneBilling.Models.SliceMgtModel
@{
    ViewBag.Title = "分段计费表管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    function del(id, name) {
        var r = confirm("确认删除分段计费表：" + name + "吗？");
        if (r == true) {
            window.location.href = "/Manage/SliceDelete?id=" + id;
        }
        return false;
    }
</script>
@if (Model.Message != null){<h2>@Model.Message</h2>}
<p id="btn-create" class="box"><a href="/Manage/SliceEdit"><span>新增分段计费等级表</span></a></p>
@{
    var grid = new WebGrid(source: Model.SliceList, rowsPerPage: 30);
}
@grid.GetHtml(
    alternatingRowStyle: "bg",
    columns:grid.Columns
    (
        grid.Column("Name","收费等级表"),
        grid.Column("Remark", "备注"),
        grid.Column(format:(item)=> Html.ActionLink("修改","SliceEdit",new {id=item.ID})),
        grid.Column(format: (item) => Html.Raw(string.Format("<a href='javascript:' onclick=\"del('{0}','{1}')\">删除</a>", item.ID, item.Name)))
    )
)



